package com.horizon.wxapp.controller;

import com.horizon.wxapp.entity.Comments;
import com.horizon.wxapp.service.CommentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("comments")
public class CommentsController {

    @Autowired
    private CommentsService commentsService;

    @RequestMapping
    public List<Comments> listComments() {
        return commentsService.listComments();
    }

}
